﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Knockout</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script type="text/javascript" src="../../libs/knockout/v3.4.2/knockout-debug.js"></script>
    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.slim.min.js"></script>
</head>
<script>
    var myViewModel = {
        Name: "Lilei",
        profession: "软件工程师",
    };
</script>
<body>
    <div id="app"> 
        姓名：<label data-bind="text:Name"></label><br />
        职业：<input type="text" data-bind="textinput:profession" />
    </div>
</body>
<script>
    ko.applyBindings(myViewModel, document.getElementById('app'));
</script>
</html>